/**
 * Created by fangshufeng on 2018/1/10.
 */

import {Modal} from 'antd'

export let SuccessModal = function (msg) {
    const modal = Modal.success({
        title: '恭喜',
        content: msg,
    });

    setTimeout(() => modal.destroy(), 1000)
};

export let ErrorModalAutoDismiss = function (msg, disSec = 1000) {
    const modal = Modal.error({
        title: '提示',
        content: msg,
    });

    setTimeout(() => modal.destroy(), disSec);
};


export let SucceedModalAutoDismiss = function (msg, disSec = 1000) {
    const modal = Modal.success({
        title: '提示',
        content: msg,
    });

    setTimeout(() => modal.destroy(), disSec);
};

export let InfoModal = function (info) {
    const modal = Modal.info(info)
    return modal;
};